Given a couple of values, returns the first of them that is not null nor empty.

Namespace: Keystone.Polaris
Assembly: Keystone (in Keystone.dll)

public static T Coalesce<T>( 
this T valueOf
T withAlternativeValue 
)
This language is not supported or no code example is available.

Type Parameters

T

The type of the values to evaluate.

Parameters

valueOf

Type: T

The first value to be evaluated for non nullability and non emptiness.

withAlternativeValue

Type: T

The second value to be evaluated for non nullability and non emptiness.

Return Value

The first of the given values that is not null nor empty.

Windows, Windows Server, OS X, macOS, iOS, tvOS, Android, Linux, AWS, Azure

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 4.6

Others

Xamarin, Mono